/*
day330 
2020.7.23 
*/
#include<iostream>
#include<vector>
using namespace std;

class Solution {
public:
    vector<int> productExceptSelf(vector<int>& nums) {
		vector<int> res(nums.size());
		
		int p=1;
		for(int i=0;i<nums.size();++i)
		{
			res[i]=p;
			p*=nums[i];
		}
		
		p=1;
		for(int i=nums.size()-1;i>=0;--i)
		{
			res[i]*=p;
			p*=nums[i];
		}
		
		return res;
    }
};

int main()
{
	return 0;
 } 
